<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <!-- 页面meta -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>数据 - AdminLTE2定制版</title>
    <%@include file="/pages/common/head.jsp" %>

    <meta name="description" content="AdminLTE2定制版">
    <meta name="keywords" content="AdminLTE2定制版">
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport">
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->

    <link rel="stylesheet" href="plugins/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="plugins/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="plugins/ionicons/css/ionicons.min.css">
    <link rel="stylesheet" href="plugins/iCheck/square/blue.css">
    <link rel="stylesheet" href="plugins/morris/morris.css">
    <link rel="stylesheet" href="plugins/jvectormap/jquery-jvectormap-1.2.2.css">
    <link rel="stylesheet" href="plugins/datepicker/datepicker3.css">
    <link rel="stylesheet" href="plugins/daterangepicker/daterangepicker.css">
    <link rel="stylesheet" href="plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">
    <link rel="stylesheet" href="plugins/datatables/dataTables.bootstrap.css">
    <link rel="stylesheet" href="plugins/treeTable/jquery.treetable.css">
    <link rel="stylesheet" href="plugins/treeTable/jquery.treetable.theme.default.css">
    <link rel="stylesheet" href="plugins/select2/select2.css">
    <link rel="stylesheet" href="plugins/colorpicker/bootstrap-colorpicker.min.css">

    <link rel="stylesheet" href="plugins/adminLTE/css/AdminLTE.css">
    <link rel="stylesheet" href="plugins/adminLTE/css/skins/_all-skins.min.css">
    <link rel="stylesheet" href="css/style.css">
    <link rel="stylesheet" href="plugins/ionslider/ion.rangeSlider.css">
    <link rel="stylesheet" href="plugins/ionslider/ion.rangeSlider.skinNice.css">
    <link rel="stylesheet" href="plugins/bootstrap-slider/slider.css">
    <link rel="stylesheet" href="plugins/bootstrap-datetimepicker/bootstrap-datetimepicker.css">
</head>

<body class="hold-transition skin-purple sidebar-mini">

<section class="content-header">
    <h1>
        数据管理
        <small>用户组</small>
    </h1>
    <ol class="breadcrumb">
        <li><a href="#" onclick="goToHome()" ><i class="fa fa-dashboard"></i> 首页</a></li>
        <li><a href="#" onclick="goToHome()">数据管理</a></li>
        <li class="active">用户组</li>
    </ol>
</section>

<section class="content">

    <div class="row">

        <div class="col-md-12">

            <div class="box box-primary">
                <div class="box-header with-border">
                    <h3 class="box-title">数据管理</h3>
                </div>


                <form id="myform" role="form" method="post" action="manager/usergroupServlet">
                    <input type="hidden" name="action" value="${ empty param.id ? "add" : "update" }">
                    <input type="hidden" name="id" value="${ requestScope.usergroup.id }">
                    <input type="hidden" name="pageNo" value="${ param.pageNo }">
                    <input type="hidden" name="queryString" value="${ param.queryString }">

                    <div class="tab-content box-body">
                        <div class="tab-pane active" id="tab-common">
                            <div class="row data-type">

                                <div class="col-md-4 title">用户组名</div>
                                <div class="col-md-8 data">
                                    <input type="text"  <c:if test="${isShow =='isShow'}">readonly</c:if>  name="groupname" id="groupname" class="form-control" placeholder="用户组名" value="${usergroup.groupname}">
                                </div>

                                <div class="col-md-4 title">联系号码</div>
                                <div class="col-md-8 data">
                                    <input type="tel" id="phone" <c:if test="${isShow =='isShow'}">readonly</c:if>   name="phone" class="form-control" placeholder="联系号码" value="${usergroup.phone}">
                                </div>

                                <div class="col-md-4 title">备注</div>
                                <div class="col-md-8 data">
                                    <input type="text" id="memo" <c:if test="${isShow =='isShow'}">readonly</c:if>   name="memo" class="form-control" placeholder="备注" value="${usergroup.memo}">
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="tab-content box-body">
                        <div class="box-footer">

                                <c:if test="${isShow !='isShow'}">
                                <button type="submit" onclick="submitForm();return false;" id="submitBtn" class="btn btn-primary">确 认</button>
                                </c:if>

                            <button class="btn btn-primary" onclick="window.history.back();return false;">返 回</button>
                        </div>
                    </div>

                </form>
            </div>
        </div>
    </div>
</section>



<script src="plugins/jQuery/jquery-2.2.3.min.js"></script>
<script src="plugins/jQueryUI/jquery-ui.min.js"></script>
<script>
    $.widget.bridge('uibutton', $.ui.button);
</script>
<script src="plugins/bootstrap/js/bootstrap.min.js"></script>
<script src="plugins/raphael/raphael-min.js"></script>
<script src="plugins/morris/morris.min.js"></script>
<script src="plugins/sparkline/jquery.sparkline.min.js"></script>
<script src="plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script>
<script src="plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>
<script src="plugins/knob/jquery.knob.js"></script>
<script src="plugins/daterangepicker/moment.min.js"></script>
<script src="plugins/daterangepicker/daterangepicker.js"></script>
<script src="plugins/daterangepicker/daterangepicker.zh-CN.js"></script>
<script src="plugins/datepicker/bootstrap-datepicker.js"></script>
<script src="plugins/datepicker/locales/bootstrap-datepicker.zh-CN.js"></script>
<script src="plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"></script>
<script src="plugins/slimScroll/jquery.slimscroll.min.js"></script>
<script src="plugins/fastclick/fastclick.js"></script>
<script src="plugins/iCheck/icheck.min.js"></script>
<script src="plugins/adminLTE/js/app.min.js"></script>
<script src="plugins/treeTable/jquery.treetable.js"></script>
<script src="plugins/select2/select2.full.min.js"></script>
<script src="plugins/colorpicker/bootstrap-colorpicker.min.js"></script>
<script src="plugins/bootstrap-wysihtml5/bootstrap-wysihtml5.zh-CN.js"></script>


<script src="plugins/input-mask/jquery.inputmask.js"></script>
<script src="plugins/input-mask/jquery.inputmask.date.extensions.js"></script>
<script src="plugins/input-mask/jquery.inputmask.extensions.js"></script>
<script src="plugins/datatables/jquery.dataTables.min.js"></script>
<script src="plugins/datatables/dataTables.bootstrap.min.js"></script>
<script src="plugins/chartjs/Chart.min.js"></script>
<script src="plugins/flot/jquery.flot.min.js"></script>
<script src="plugins/flot/jquery.flot.resize.min.js"></script>
<script src="plugins/flot/jquery.flot.pie.min.js"></script>
<script src="plugins/flot/jquery.flot.categories.min.js"></script>
<script src="plugins/ionslider/ion.rangeSlider.min.js"></script>
<script src="plugins/bootstrap-slider/bootstrap-slider.js"></script>
<script src="plugins/bootstrap-datetimepicker/bootstrap-datetimepicker.js"></script>
<script src="plugins/bootstrap-datetimepicker/locales/bootstrap-datetimepicker.zh-CN.js"></script>
<script src="plugins/my/my.js"></script>

<script type="text/javascript">


    //提交
    function submitForm(){
        //数据检查
        var groupname = $("#groupname").val();
        var phone = $("#phone").val();
        var messages = "";
        if(groupname == ""){
            messages = messages + " 用户名不能为空";
        }
        if(phone == ""){
            messages = messages + " 联系号码不能为空";
        }
        if(messages == ""){
            $("#myform").submit();
        }else{
            alert(messages);
        }
    }


    $(document).ready(function () {
        // 选择框
        $(".select2").select2();

        // WYSIHTML5编辑器
        $(".textarea").wysihtml5({
            locale: 'zh-CN'
        });
    });

    // 设置激活菜单
    function setSidebarActive(tagUri) {
        var liObj = $("#" + tagUri);
        if (liObj.length > 0) {
            liObj.parent().parent().addClass("active");
            liObj.addClass("active");
        }
    }


    $(document).ready(function () {



        // 激活导航位置
        setSidebarActive("admin-datalist");





    });
</script>
</body>

</html>
